package study;

import java.util.Random;

public class random {
    public static void main(String[] args){
        int[] arr = { 1 , 2 , 3 , 4 , 5 };
        Random r = new Random();
        for(int i = 0;i < 5;i++){
            int randomindex = r.nextInt(5);
            int temp = arr[i];
            arr[i] = arr[randomindex];
            arr[randomindex] = temp;
        }
        for(int i = 0;i < 5;i++){
            System.out.println(arr[i]);
        }

    }
}
